package com.mycom.test;

import com.mycom.dao.StudentDao;
import com.mycom.entity.Student;

import java.sql.Date;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        //Dao
        StudentDao studentDao = new StudentDao();
        //添加
//        Student stu = new Student("hlw999","hello","male",20,new Date(2004-1900,10-1,10),77);
//        int result = studentDao.addStudent(stu);
//        System.out.println(result);

        //查询多个数据
        List<Student> stus = studentDao.queryStudent("male",25);
        for(Student stu : stus){
            System.out.println(stu);
        }

        //根据ID查询单个数据
//        Student student = studentDao.queryStudentById(13);
//        System.out.println(student);
    }
}
